<template>
    <div class="home_box">
      <el-row>
  <el-col :span="8" v-for="(o, index) in 1" :key="o" :offset="index > 0 ? 2 : 0">
    <el-card :body-style="{ padding: '10px' }">
      <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image">
      <div style="padding: 18px;">
        <span>可能好吃的汉堡</span>
        <div class="bottom clearfix">
          <time class="time">{{ currentDate }}</time>
        </div>
      </div>
    </el-card>
  </el-col>
</el-row>
      <el-form ref="form" :model="form" label-width="90px" >
        <h2 style="text-align: center;">创建账号</h2>
        <el-form-item >
          <el-input v-model="form.name" prefix-icon="el-icon-user" placeholder="请输入用户名"
          ></el-input>
        </el-form-item>
        <el-form-item>
          <el-input placeholder="请输入密码" show-password prefix-icon="el-icon-lock"></el-input>
        </el-form-item>
        <el-form-item>
          <el-input placeholder="请二次确认密码" show-password prefix-icon="el-icon-lock"></el-input>
        </el-form-item>

        <el-form-item>
          <el-button type="primary" @click="onSubmit" style="margin-right: 20px;">立即注册</el-button>
          <el-button @click="loginindex">取消</el-button>
        </el-form-item>
      </el-form>
    </div>
  </template>

<script>
export default {
  name: 'HomeIndex',
  data () {
    return {
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: '',
        active: 0
      },
      currentDate: new Date('2023-10-10 15:51:23')
    }
  },
  methods: {
    onSubmit () {
      console.log('submit!')
    },
    next () {
      if (this.active++ > 2) this.active = 0
    },
    loginindex () {
      this.$message.warning('取消注册，将返回登录界面!')
      setTimeout(() => {
        this.$router.push('/login')
      }, 3000)
    }
  }
}
</script>

<style lang="less" scoped>
.time {
    font-size: 13px;
    color: #999;
  }
  .image {
    width: 100%;

  }
.el-card{
  border-radius: 20px;
  width: 520px;
    height: 620px;
}
.el-col{
  box-shadow: 0 0  10px 5px #9ea2a5;
  border-radius: 20px;
  position: absolute;
  transform: translate(67%, 25%);
  width: 520px;
    height: 620px;
}
.home_box{
height: 100%;
background-color: antiquewhite;
}
.el-form{
background-color: aliceblue;
  width: 520px;
  height: 620px;
  border-radius: 20px;
  box-shadow: 5px 5px 10px #9ea2a5;
  position: absolute;
  margin: 0;
  transform: translate(168%, 25%);
}
.el-form-item{
text-align: center;
position: relative;
box-sizing: border-box;
padding: 10px;
transform: translate(-10%,90%);

}
.el-button{
  border-radius: 16px;
  position: relative;
  top: 80px;
}
input.el-input__inner{
  border-radius: 20px;
}
</style>
